<template>
  <div class="con">
    <div class="zhong">
      <el-carousel height="18vw">
        <el-carousel-item v-for="item in lunbo"
                          :key="item.id">
          <img :src="item.imgUrl"
               style="width: 100%;height: 100%;"
               @click="linkLunbo(item)" />
        </el-carousel-item>
      </el-carousel>
    </div>
    <div class="div">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item class="dangqian">入驻流程</el-breadcrumb-item>
      </el-breadcrumb>
      <div class="nei"
           v-html="detail.content"></div>
    </div>
  </div>
</template>

<script>
export default {
  name: '',
  data() {
    return {
      html: '<p>aaaaaa</p>',
      detail: {},
      lunbo: []
    }
  },
  created() {
    this.isinput();
    this.$postRequest('/api/cms/slide/list', {
      type: 7
    }).then(res => {
      this.lunbo = res.data
    })
    this.$postRequest('/api/mallServer/getServers', {
      status: 5
    }).then(res => {
      if (res.data) {
        this.detail = res.data
      }
    })
  },
  methods: {
    isinput() {
      this.$store.commit("setDValue", false);
    },
    linkLunbo(item) {
      if (item.mode == 0) {
        this.$router.push({ name: 'detail', query: { id: item.goodsId } })
      } else if (item.mode == 1) {
        window.location.href = item.linkUrl
      }
    },
  }
}
</script>
<style scoped lang="scss">
.con {
  background-color: #f9f9f9;
  .img {
    width: 100%;
  }
  .div {
    width: 1400px;
    margin: auto;
    /deep/ .el-breadcrumb {
      height: 48px;
      font-size: 14px;
      line-height: 48px;
      .el-breadcrumb__inner {
        color: #999;
        font-weight: 500;
      }
      .dangqian .el-breadcrumb__inner {
        color: #1a69e0;
      }
    }
    .nei {
      width: 100%;
      min-height: 500px;
      background: #ffffff;
      padding: 30px;
      margin-bottom: 30px;
    }
  }
  .zhong {
    width: 100%;
    height: 18vw;
    .zhongdi {
      margin-top: 20px;
      display: flex;
      justify-content: space-between;
      img {
        width: 100%px;
        height: 180px;
      }
    }
  }
}
</style>